import 'package:flutter/material.dart';

class Page2 extends StatefulWidget {
  @override
  _Page2State createState() => _Page2State();
}

class _Page2State extends State<Page2> {
  Map<String, dynamic> params;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    params = ModalRoute.of(context).settings.arguments;
    return Scaffold(
      appBar: AppBar(
        title: Text("page2"),
      ),
      body: Container(
        alignment: Alignment.center,
        child: Text("params = ${params?.toString()}"),
      ),
    );
  }
}
